﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using XCommunity.Web;
using System.Security.Principal;

public partial class Header : System.Web.UI.UserControl
{
  protected void Page_Load( object sender, EventArgs e )
  {
    IIdentity account = WebCommunityContext.CurrentCommunityContext.CurrentAccount;

    if ( account.IsAuthenticated )
    {
      Username.Text = account.Name;
      LoggedView.Visible = true;
    }
    else
      NotLogged.Visible = true;
  }
}
